/* 
 * File:   fileIO.h
 * Author: Patrick W. M. Adams
 * Institution: Astrophysics, Cosmology and Gravity Centre,
 *              Department of Mathematics and Applied Mathematics,
 *              University of Cape Town
 *
 * Created on 13 March 2012, 1:22 AM
 */

#ifndef FILEIO_H
#define	FILEIO_H

#include <boost/algorithm/string.hpp>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "params.h"

//class fileIO
class FileIO{
    
public:
    
    FileIO(); //default constructor
    FileIO(std::string); //argument constructor
    FileIO(const FileIO&); //copy constructor
    
    ~FileIO(); //destructor
    
    void setFileName(std::string); //set input file name
    void readFile(bool, std::vector<std::string>&); //read an input file
    void readParamFile(std::string, std::vector<std::string>&); //read input param files
    void writeFile(std::string, std::string); //write an output file
    
    FileIO& operator=(const FileIO&); //operator= overload
    
private:
    
    std::string fName; //name of input/output file
    std::string fLine; //line of file being handled
    
    
};//end class fileIO

#endif	/* FILEIO_H */

